package cn.xyh.service;


import cn.xyh.exception.PermissionException;
import cn.xyh.model.Permission;

import java.util.List;
import java.util.Set;

public interface IPermissionService {

    /**
     * 新增
     */
    public Integer insertPermission(Permission entity) throws PermissionException;

    /**
     * 删除多个
     */
    public Integer delPermissionByIds(String primaryKey) throws PermissionException;

    /**
     * 删除
     */
    public Integer delPermission(long id) throws PermissionException;

    /**
     * 修改
     */
    public Integer updatePermission(Permission entity) throws PermissionException;

    /**
     * 根据ID查找对象
     */
    public Permission getPermissionById(long permissionId) throws PermissionException;

    /**
     * 根据Code查找对象
     */
    public Permission getPermissionByCode(String code) throws PermissionException;

    /**
     * 根据名称查找对象
     */
    public Permission getPermissionByName(String name) throws PermissionException;

    /**
     * 根据条件查找列表总数
     */
    public Integer getPermissionCount(Permission entity) throws PermissionException;

    /**
     * 根据条件查找列表
     *
     * @param entity      实体对象
     * @param startRownum 开始条数
     * @param endRownum   结束条数
     * @param sortField   排序字段
     * @param sortOrder   正序/倒序
     */
    public List<Permission> getPermissionList(Permission entity) throws PermissionException;
    public  Set<String> getPermsByySetName(List<Integer> list);
}

